package ru.vsu.cs.kis.elections.socketexchenge.commands;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;


public abstract class Command implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 42736627865566234L;
	
	protected transient OutputStream aOutStr;
	protected transient InputStream aInStr;
	
	public Command(){		
	}
	
	public Command(OutputStream aOutStr, InputStream aInStr){	
		this.aInStr=aInStr;
		this.aOutStr=aOutStr;
	}
	
	public void setOutputStream(OutputStream aOutStr){
		this.aOutStr=aOutStr;
	}
	
	public void setInputStream(InputStream aInStr){
		this.aInStr=aInStr;
	}
	
	public abstract Integer executeOnServer() throws IOException;
	
	public abstract Integer executeOnClient() throws IOException;	
}
